//--------------------------------------------------------------------------------
// This file is a portion of the D2D1Renderer.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Mirco Timmermann
//
//--------------------------------------------------------------------------------
#include "Image.h"


Image::Image(std::wstring filename) {
	_rect = 0;

	_bitmap = D2D1Renderer::Get()->LoadBitmapFromFile(filename);

	D2D1_SIZE_U size = _bitmap->GetPixelSize();
	this->_width = size.width;
	this->_height = size.height;
}

Image::~Image(void) {
	if(_bitmap != 0) {
		_bitmap->Release();
	}
}